/**
 *#info
 *@author   wuwg
 *@createTime   2018/03/20
 *@updateTime   2018/05/18
 *@description  标题组件，其实就是html中的H1,H2,H3...
 */
import config from '../../../config/config.js'

/**
 * #item
 *
 * @type aty-title
 * @cn  标题
 * @menu 基础
 * @order 16
 * @nameprop  text
 * @stPlugin true
 * @stContainer false
 * @mixins   [./components/components/basic/$listenersAnnotation.js]
 */
// 模块
const module = {
  // functional:true,
  name: config.prefix + '-title',
  components: {},
  props: {
    /**
     * #property
     *
     * @name  text
     * @cn    文本
     * @type  string
     * @value title
     * @description 标题内的文本
     */
    text: {
      type: String,
      default: 'title'
    },
    /**
     * #property
     *
     * @name level
     * @cn  级别
     * @type list
     * @options [1,2,3,4,5,6]
     * @value  1
     * @description 标题级别,取值为 [1,2,3,4,5,6]中的一个
     */
    level: {
      type: [Number, String],
      default: 1
    }
  },
  data () {
    return {
      scope: {
        className: config.prefix + '-title',
        level: this.level
      }
    }
  },
  computed: {
    classes () {
      return {
        [this.scope.className]: true,
        [this.scope.className + '-' + this.scope.level]: true
      }
    }
  }
}
export default module
